package net.huashitong.taskGroup.web;

import com.sirdc.modules.core.web.JsonBaseController;
import com.sirdc.modules.core.web.model.Message;
import net.huashitong.taskGroup.entity.DeptList;
import net.huashitong.taskGroup.filter.DeptListFilter;
import net.huashitong.taskGroup.service.DeptListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Controller
@RequestMapping("/deptList")
public class DeptListCtrl extends JsonBaseController {

    @Override
    protected String getView(String s) {
        return null;
    }

    @Autowired
    private DeptListService service;
    @ResponseBody
    @RequestMapping(value = "/queryAll",method = RequestMethod.GET)
    public Message queryAllDept(){
        List<DeptList> list = service.query();
        return coverMessage("200","获取成功",list);
    }
}
